Class 11 Lab - Remote Sensing - Accessing Landsat Imagery & Orientation to Classification

image credit: Martucci, Antonio (NRL) | accessed via http://www.fao.org

Concepts & Themes:

This week’s lab will explore following preprocessing steps necessary for working with multi-band satellite imagery:

  1. Acessing Landsat Imagery
  2. Image Classification

Part I:

  • Accessing Landsat Imagery:

  • Remote sensing analysis in desktop GIS requires input data from a satellite sensor. This imagery typically comes in a banded format whereby different wavelength values from the electromatic spectrum are distributed across different bands. These different bands are then combined to produce different visual and analysis products in desktop GIS.

  • A longstanding access interface for remote sensing imagery is EarthExplorer. Here a user creates a login profile and then has access to a range of products. Sometimes these products can be immediately downloaded, and sometimes they are prepared and then distributed via email notification.

  • Regarding the Landsat program which is the focus of this lab, there are several products that are available as noted in the table below:

Landsat Options

Landsat Interface at EarthExplorer

  • Typically level-1 products are more ‘raw’ than level-2 products. The level-1 products typically require more pre-processing in desktop GIS to produce the best results. The level-2 products are considered enhanced, but they usually require an ‘order’ and email notification as opposed to a direct download. The new (post-2018) ‘Analysis Ready Data’ (ARD) products are a highly tailored product designed to remove the burden of pre-processing. They also feature additional products outside the typical banded structure of level-1 and level-2. In this lab, we will utilize the ARD data to gain insight into recent burn areas in California, as well as explore ‘Land Surface Temperature’ (LST) in an urban environment.

  • The following steps outline navigation within EarthExplorer. For each component of the lab, data has been prepared from the EarthExplorer interface in order to save time. There are 5 essential steps to gaining access to imagery in EarthExplorer:

5 EarthExplorer Interface Components

  1. User Account Signup and Login - before using the interface, a signup with email is required; once done, future login happens with typical username/password combination.
  2. Geographic Search - There are many options for selecting the first criteria of the image search which is location. One effective approach is to upload a bounding box geometry of a project area in compressed format, utilizing the shapefile option at the EarthExplorer interface.
  3. Again, the Date Range and Cloud Cover parameters can be set, but are not required. This is especially helpful for land change detection where you have a specific date range and low tolerance for cloud cover for the analysis imagery. If left alone, the results will just be served based on most recent chronological order, regardless of cloud cover %.
  4. The Data Sets option is where the produce choice is made from the list of provided data within EarthExplorer.
  5. The Results section is, as named, the results of all the criteria selected. Here the product is either downloaded directly or ordered. The following image details 3 Results options:

EarthExplorer Results Options

  • The Footprint preview is very helpful to make sure the tile extent covers the full project area for analysis. Further, for projects requiring multiple tiles, adjacent tiles can easily be ascertained through this tool.
  • The Download Icon displays if the product can be downloaded directly; more product options will be available via this tool icon.
  • The Order Basket allows for ordering of products that cannot be directly downloaded, and must be ordered.

Part II:

  • To start, a Landsat 8 scence for Dubai, UAE has been ordered and placed in the following location for direct download - C11 Lab Data - Landsat Scene for Dubai, UAE.

  • LC08_L2SP_160043_20211012_20211019_02_T1

  • 2021/10/12

  • WRS Path 160

  • WRS Row 043

Landsat Scene at EarthExplorer

  • Step 2 - Uncompress the Landsat product:

  • Download 7 zip to your own machine if necessary

  • Download Keka to a Mac machine

    • The first file will have an extension of .tar.gz.
    • Use 7-Zip to ‘extract here’ .tar.gz file. The result = .tar file.
    • Use 7-Zip a second time to ‘extract here’ .tar.file
    • The directory expanded will feature all Landsat bands for the product. For purposes of this lab - explore band typical band combinations - we will access bands 1-7. A full listing of the bands shown in chart format, then as they exist in the directory:

Dubia, UAE Landsat 8 Scene in Directory outside QGIS

  • STEP 3, open QGIS and point the Data Source Manager to the working directory as shown in the above image:

  • STEP 4, import just bands 1 - 7 Preview the individual bands in Layers Panel:

Individual Bands loaded to QGIS

  • In order to utilize the rasters for analyses and visual display, a multispectral, multiband image needs to be created. To do so, we will use the Build Virtual Raster option within QGIS:

Build Virtual Raster

Insert all 7 bands into the tool, and Toggle ON the Separate Bands option

  • The .vrt multispectal, multiband raster is now ready for analysis and/or band combinations. Typically the first step is to develop an appropriate band combination to accentuate a certain visual characteristic and/or land cover feature. Importantly, each satellite product has its own band combinations. Listed here are typical combinations of the Landsat 8 product. To finish this Part II lab, 3 band combinations will be applied and then viewed:

  • Natural Color (4, 3, 2)

  • Color Infrared (5, 4, 3)

  • Short-Wave Infrared (7, 6 4)

  • Agriculture (6, 5, 2)

  • Geology (7, 6, 2)

  • More details on band combinations located HERE

  • To enact a band combination, navigate to Layer Properties > Symbology > Multiband Color and set the first combination to 4-3-2.

4-3-2 Band Combination

  • This band combination is known as ‘True Color’ as the band 4 is the red color band, 3 is the green color band and 2 is the blue color band. This is the color range we typically ‘see’, i.e. looking out an airplane window. Any other band combination is a ‘False Color’ meaning we are forcing wavelength values into the red/green/blue color space.

  • To start the first band combination 4-3-2 set symbology as follows. Notice that the image looks washed out and hazy. This is because the current image is stretched across all values in the raster. This can be corrected two ways. First, set the cumulative cut upwards towards 10% instead of 2%; and secondly, set the statistical extent to the map canvas. Going forward, the image will render much more accurately:

Cumulative Cut

Raster Extent

  • 4, 3, 2 - True Color (corrected):

4/3/2 True Color

  • 7, 6, 4 - False Color:

7/6/4 False Color

  • 5, 4, 3 - Traditional Color Infrared (CIR):

5/4/3 CIR Infrared

Part III:

  • In Class 11 assignment, following the band creation process for Landsat imagery, the imagery will be trained and classed. We will review this process during both this lab and the lecture demo.

  • The imagery will be classified into ‘classes’, ‘bins’ or ‘buckets’ of similar pixels that are meaningful for a particular analysis. In the assignment, we will be interested in just 2 classes - water and land.

  • We will utilize the dzetsaka tool plugin for the lecture demo, lab and assignment -this will be the classification tool for this week.

  • There are several cluster algorithms in the tool that are available. However, depending on your machine and setup, you may need to download the scikit-learn python library in QGIS. Directions for this step are located at the assignment 11 towards the end. You will only need to do this installation if you are:

  1. Not using the default Gaussian Mixture algorithm.
  2. You Are interested in using one of the other algorithms - particularly the k-Means Neighbors method.

dzetsaka tool sample data

  • Next, download and install the plugin:

dzetsaka tool plugin

  • Situate to the project where a training shapefile and a raster base are necessary components:

Training Shapfile + Raster Map

  • Here a old map has been rasterized and georeferenced into QGIS. From this map, the 5 features in the training correspond with locations in the old map where those land types exist. The classification will go through the image, and determine all areas within the raster that fit the pattern of each of the 5 training features.

  • Populate the tool as follows:

Class will be used as the training input for this demonstration

  • Before performing the classification, choose the method, with the Gaussian Mixture method first:

Gaussian Mixture

  • Rerun for comparison the k-Means Neighbors method:

k-Means Neighbors

  • Compare the results:

Methods Comparison

  • As seen from the comparison, each method treats the clustering of each class in the training sample differently. There is no ‘right’ or ‘wrong’ method per se; what method you choose depends on the outcome that you seek to acheive. Do note that k-Means Neighbors takes significantly longer to run than Gaussian Mixture. Importantly, k-Means Neighbors only picks up 4 classes, whereas Gaussian Mixture picks up all five. If the training samples are reviewed, its clear that the forest class crosses a red road; in the k-Means Neighbors method it lumps this read into the forest class, and disregards the 1 polygon in the training for Buildings.